home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / tape / Ioc_TapeCommand.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-12-13  |  1.6 KB  |  58 lines

  1. /* 
  2.  * Ioc_TapeCommand.c --
  3.  *
  4.  *    Source code for the Ioc_TapeCommand library procedure.
  5.  *
  6.  * Copyright 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef lint
  17. static char rcsid[] = "$Header: Ioc_Reposition.c,v 1.2 88/07/29 17:08:46 ouster Exp $ SPRITE (Berkeley)";
  18. #endif not lint
  19.  
  20. #include <sprite.h>
  21. #include <fs.h>
  22. #include <dev/tape.h>
  23.  
  24.  
  25. /*
  26.  *----------------------------------------------------------------------
  27.  *
  28.  * Ioc_TapeCommand --
  29.  *
  30.  *    Issue a command to a tape drive.  There are several commands defined
  31.  *    that do tape specific operations like rewind, file skip, write file
  32.  *    mark, etc.  These are defined in <dev/tape.h>.
  33.  *
  34.  * Results:
  35.  *    None.
  36.  *
  37.  * Side effects:
  38.  *    Manipulate a tape drive.
  39.  *
  40.  *----------------------------------------------------------------------
  41.  */
  42.  
  43. ReturnStatus
  44. Ioc_TapeCommand(streamID, command, count)
  45.     int streamID;        /* StreamID returned from Fs_Open */
  46.     int command;        /* Commands defined in <dev/tape.h>. */
  47.     int count;            /* Repetition count for the command. */
  48. {
  49.     register ReturnStatus status;
  50.     Dev_TapeCommand args;
  51.  
  52.     args.command = command;
  53.     args.count = count;
  54.     status = Fs_IOControl(streamID, IOC_TAPE_COMMAND, sizeof(Dev_TapeCommand),
  55.             (Address)&args, 0, (Address) 0);
  56.     return(status);
  57. }
  58.